package com.tyl.xtk.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tyl.xtk.beans.po.Role;
import com.tyl.xtk.beans.po.User;
import com.tyl.xtk.beans.query.LoginForm;
import com.tyl.xtk.beans.query.PageQuery;
import com.tyl.xtk.beans.vo.LoginResult;
import com.tyl.xtk.beans.vo.Result;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.constraints.NotNull;

import java.util.List;

/**
 * create by tyl at 2025/8/27
 */
public interface UserService extends DataService<User> {

    Result<LoginResult> login(LoginForm loginForm);

    boolean logout();

    User selectCurrentUser();

    List<Role> selectRoleListByUserId(long userId);
    
    /**
     * 用户注册
     * @param user 用户信息
     * @return 注册结果
     */
    Result<User> register(User user);
    
    /**
     * 保存验证码到Redis
     * @param uuid 验证码唯一标识
     * @param captcha 验证码文本
     */
    void saveCaptchaToRedis(String uuid, String captcha);
}